package com.skywolf.chem.common.enums;

import com.skywolf.chem.common.sysconfig.response.IResponseCode;
import lombok.Getter;
import lombok.ToString;


@Getter
@ToString
public enum ResponseCodeEnum implements IResponseCode {

    SYSTEM_ERROR(100500, "系统错误"),
    PARAM_ERROR(100501, "参数错误"),
    UNAUTHORIZED(100401, "未授权"),
    INVALID_TOKEN(100403, "认证失败"),
    HEADER_TOKEN(100404, "请求header错误"),
    USER_DUPLICATE(200001, "用户已存在"),
    USER_NOT_FOUND(200002, "用户不存在"),
    USER_INVALID_USERNAME_PASSWORD(200003, "用户名或密码错误"),
    USER_FORBIDDEN(200004, "用户已被禁用"),
    USER_INVALID_OLD_PASSWORD(200005, "旧密码错误"),
    ROLE_DUPLICATE(201001, "角色已存在"),
    ROLE_NOT_FOUND(201001, "角色不存在"),
    FASTDFS_ERROR(900001, "文件系统异常"),

    PHONE_ERROR(900001, "请输入正确手机号"),
    PHONE_DUPLICATE(900002, "手机号已注册"),
    MSG_ERROR(900003, "短信发送失败"),
    ACCOUNT_ERROR(900004, "用户不存在"),
    CODE_EXPIRE(900005, "验证码已过期"),
    PWD_ERROR(900006, "密码错误"),
    PHONE_NO_REG(900007, "手机号未注册"),
    ACCOUNT_NOT(900008, "当前账号手机号不匹配"),
    PWD_NEW(900009, "请输入新密码"),
    API_INVALID_TOKEN(10000, "请先登录"),
    CODE_ERROR(900010, "验证码错误"),
    ;

    ResponseCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    /**
     * 机读响应码
     */
    private Integer code;

    /**
     * 认读响应信息
     */
    private String message;

}
